<style type="text/css">
a {
	cursor: pointer;
}
</style>
<script src="/include/ckeditor/ckeditor.js"></script>
<script src="/include/ckeditor/adapters/jquery.js"></script>
<script src="/include/bootstrapadmin/js/select2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	 CKEDITOR.replace( 'editor' );
})
</script>
<div class="pageheader">
	<h2>
		<i class="fa fa-sitemap"></i>办公管理
	</h2>
	<div class="breadcrumb-wrapper">
		<span class="label">你所在的位置：</span>
		<ol class="breadcrumb">
			<li><a href="/index">ERP管理系统</a></li>
			<li>办公管理</li>
			<li class="active">修改日报</li>
		</ol>
	</div>
</div>
<div class="contentpanel">
    <div class="main">
    <form action="/office/updatedaily" method="post" class="form-horizontal">
        <?php if ($this->msg):?>
        <div style="margin: 20px 184px;" class="form-group"><?php foreach ($this->msg as $v):?><span class="label label-warning"><?php echo $v;?></span><?php endforeach;?></div>
        <?php endif;?>  
        
        <div class="form-group form-inline">
            <label for="Content" class="col-sm-2 control-label">日报内容：</label>
            <div class="col-sm-10">
                <input name="id" value="<?php echo $this->id; ?>" type="hidden">
                <textarea id="editor" name="editor" rows="10" cols="50" style="visibility: hidden;display: none;"><?php echo $this->daily['content']?></textarea>
            </div>
        </div>
        <?php 
        if(!empty($this->relateList)){
        ?>
        <!-- <div class="form-group textarea-memo">
            <label for="Content" class="col-sm-2 control-label">关联任务：</label>
            <div class="col-sm-10">
                <select class="select2" multiple="multiple" name="qa_ids[]" data-placeholder="选择相关联的任务或需求...">
                    <option value=""></option>
                    <?php 
                    	foreach ($this->relateList as $rl){
                    		echo '<option value="'.$rl['id'].'">'.$rl['site'].'：'.$rl['title'].'</option>';
                    	}
                    ?>
                </select>
            </div>
        </div>
        <div class="form-group time-progress">
            <label class="col-sm-2 control-label">关联任务的工时进度：</label>
            <div class="col-sm-10">
                <?php 
                if(!empty($this->relateList)){
                    foreach ($this->relateList as $rl){
                ?>
                <div class="input-group mb5 col-sm-12">
                    <input class="form-control in-title" type="text" style="width: 60%;"  readonly="readonly" value="<?php echo $rl['site'].'：'.$rl['title']; ?>">
                    <input class="form-control in-time" value="<?php echo $this->qatimeprolist[$rl['id']]['time']; ?>" name="<?php echo 'dotime['.$rl['id'].']'; ?>" type="text" style="width: 20%;" placeholder="所用工时(单位为时-填数字)">
                    <input class="form-control in-progress" value="<?php echo $this->qatimeprolist[$rl['id']]['progress']; ?>" name="<?php echo 'doprogress['.$rl['id'].']'; ?>" type="text" style="width: 20%;" placeholder="完成进度(百分之几-填数字)">
                </div>
                <?php } }?>
            </div>
        </div> -->
        <?php } ?>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">提交</button>
            </div>
        </div>
    </form>
    </div>
</div>
<script>
jQuery(document).ready(function(){
    
    "use strict";
    // Select2
    jQuery(".select2").select2({
      width: '100%'
    });
});
</script>